package com.zjl.search.controller;

import com.zjl.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.Map;

/**
 * @author: gfk
 * @create: 2022/11/4
 * @Description:
 * @FileName: SearchController
 * @History:
 * @自定义内容：
 */
@RestController
@RequestMapping("search")
public class SearchController {
    @Autowired
    SearchService searchService;

    @PostMapping("findSearch/{pageNo}/{pageSize}")
    public Map search(@PathVariable Integer pageNo,
                      @PathVariable Integer pageSize,
                      @RequestBody Map searchMap) throws IOException {
        return searchService.search(pageNo,pageSize,searchMap);
    }
}
